/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package GUIalmacen;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

/**
 *
 * @author manuel
 */
public class Lectura {

    public static String leerString() {
	BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
	String cadena = "";
	try {
		cadena = in.readLine();
	} catch (IOException e) {
		System.out.println(e);
	}
	return cadena;
}

    public static char leerChar() {
	char[] c = leerString().toCharArray();
	if (c.length == 1)
		return c[0];
	else {
		System.out.print("ERROR...\nIngrese un caracter: ");
		return leerChar();
	}
}
}
